/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import React, { useState } from 'react';
import { Tabs } from 'antd';
import { PageContainer } from '@ant-design/pro-layout';
import DpTable from '@/components/_pages/Finance/dbTransfer/dpTable';
import QJDpTable from '@/components/_pages/Finance/dbTransfer/qjDpTable';
import styles from './index.less';

const Index = () => {
  const [activeKey, setActiveKey] = useState<string>('wkd');
  const tabList = [
    {
      tab: '微快递订单',
      key: 'wkd',
      page: <DpTable />,
    },
    {
      tab: '全寄订单',
      key: 'qj',
      page: <QJDpTable />,
    },
  ];

  return (
    <PageContainer className={styles.dbTransFer}>
      <Tabs activeKey={activeKey} onChange={setActiveKey}>
        {tabList.map((item) => (
          <Tabs.TabPane tab={item.tab} key={item.key}>
            {item.page}
          </Tabs.TabPane>
        ))}
      </Tabs>
    </PageContainer>
  );
};

export default Index;
